<?php

namespace Lazzaroni\UsuarioBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class UsuarioType extends AbstractType {

    public function buildForm(FormBuilderInterface $builder, array $options) {
        $builder
                ->add('nombres')
                ->add('apellidos')
                ->add('username')
                ->add('email','email')
                ->add('sexo', 'choice', array('choices' => array(0=> 'Hombre',
        1 => 'Mujer'),'expanded' => true,'multiple' => false,'label' => false,'data'=>1 ))
                ->add('password', 'password')
                ->add('nacionalidad')
        ;
    }
    
    

    public function setDefaultOptions(OptionsResolverInterface $resolver) {
        $resolver->setDefaults(array(
            'data_class' => 'Lazzaroni\UsuarioBundle\Entity\Usuario'
        ));
    }

    public function getName() {
        return 'lazzaroni_usuariobundle_usuariotype';
    }

}
